<div id="notifications" class="panel panel-default">
  <div class="tools panel-heading">
    <%= link_to icon_tag("fa fa-trash", label: "清空"), clear_notifications_path, class: 'btn btn-danger', method: :post, 'data-disable-with' => '清空中...' %>
    <% if action_name == 'index' %>
      <%= link_to icon_tag("fa fa-filter", label: "未读"), unread_notifications_path, class: 'btn btn-default' %>
    <% else %>
      <%= link_to icon_tag("fa fa-filter", label: "未读"), notifications_path, class: 'btn btn-default active' %>
    <% end %>
    <div class="pull-right"><h4>通知提醒</h4></div>
  </div>
  <% if @notifications.blank? %>
    <div class="no-result panel-body" style="padding:80px 0;">暂无通知</div>
  <% else %>
    <div class="panel-body">
      <%= render partial: "notification", collection: @notifications %>
    </div>
    <div class="panel-footer">
      <%= will_paginate @notifications %>
    </div>
  <% end %>
</div>
